package com.practice.mapper.admin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.practice.pojo.admin.entity.AdminChildrens;
import com.practice.pojo.admin.entity.RoleMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

//   @Select("SELECT * FROM sys_role_menu,sys_menu  WHERE role_id=#{roleId} AND menu_id=id AND pid=#{pid} " +
//           "ORDER BY CAST(pid AS SIGNED) ASC")
    List<AdminChildrens> querySon(String roleId, Long pid);

    @Select("select * from sys_menu where id =#{id}")
    AdminChildrens queryCurrent(Long id);

}
